Skip to content

Conversation

@inodb
Copy link
Member

@inodb inodb commented Jul 2, 2025

We've received various requests to show embeddings (e.g. UMAP/PCA) on the Study View. This implements a prototype using deckgl which can support 1M points:

See preview
image

Features

  • Recangle Selection
  • Reflects filtering from study view

TODO

  • Get a realistic embedding (currently bogus for 24K cases)
  • Fix driver coloring, currently everything VUS (copy plots tab style)
  • Add tests
  • Add a way to pull the coordinates from backend (using a checked in test file atm)

@inodb inodb force-pushed the add-umap branch 2 times, most recently from ee206ad to d3f5670 Compare July 10, 2025 19:50
inodb added 2 commits August 5, 2025 12:36
Add a new Embeddingstab to the Study View, which leverages deck.gl. The
implementation uses a randomly generated scatter plot that represent UMAP and
PCA projections. The dots can be colored by clinical attributes or tumor types,
similar to the plots tab. The plot also allows for selection.
Make legend more interactive. Add embedding to more studies (anything that has
a sample in the embedding).
inodb and others added 17 commits August 5, 2025 15:14
- Add unit tests for EmbeddingPlotUtils (preComputeClinicalDataMaps, lookup maps, embedding transformations)
- Add E2E screenshot tests for cancer type, gene mutation, and clinical attribute coloring
- Add E2E interaction tests for legend toggles, filtering, and URL parameters
- Add data-test attributes to embeddings visualization and legend components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add missing required properties (studyIds, description, totalPatients, sampleSize) to PatientEmbeddingData test objects.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add &expert URL parameter to toggle QC section visibility in legend. Filter out "not in cohort" samples in normal mode. Include "Unselected" category in legend with proper gray color. Fix "Show All/Hide All" to exclude QC categories and show message when all categories hidden.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Creates a shared `rawPlotData` computed property that is called once and
cached by MobX, eliminating redundant calls to `makeEmbeddingScatterPlotData`
across the three computed properties (plotData, categoryCounts, categoryColors).

Performance impact:
- Before: 3 calls × ~30-40ms = ~90-120ms per render
- After: 1 call × ~30-40ms = ~30-40ms per render
- Net savings: ~60-80ms per render (50-67% reduction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Changes axis labels from 'Boehm 20251' and 'Boehm 20252' to 'Boehm 2025 1' and 'Boehm 2025 2' by adding a space between the embedding label and dimension number.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Replaces the single boehm_2025_umap_embedding.json with three new embedding files:
- boehm_2025_umap_he.json (H&E embeddings)
- boehm_2025_umap_genomic.json (Genomic embeddings)
- boehm_2025_umap_genomic_he.json (Combined Genomic and H&E embeddings)

The dropdown now displays three options using titles from the JSON files:
- "Boehm et al. (2025) - H&E"
- "Boehm et al. (2025) - Genomic"
- "Boehm et al. (2025) - Genomic and H&E"

Default selection is set to the H&E embedding.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Widens the embedding selection dropdown to accommodate the longer embedding names like 'Boehm et al. (2025) - Genomic and H&E' without truncation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
inodb and others added 5 commits November 4, 2025 10:07
Adds three new embedding JSON files for different embedding types:
- boehm_2025_umap_he.json (H&E embeddings)
- boehm_2025_umap_genomic.json (Genomic embeddings)
- boehm_2025_umap_genomic_he.json (Genomic and H&E embeddings)

Removes the old boehm_2025_umap_embedding.json file which is no longer referenced in the code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Updates the import from the removed boehm_2025_umap_embedding.json to the new boehm_2025_umap_he.json file. This fixes the module resolution error while maintaining the same functionality for checking embedding support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Removes the Beta! label from the Plots tab and adds it to the Embeddings tab to indicate that Embeddings is the beta feature.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant